package cn.com.greatwall.system.modules.oauth2.domain;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import cn.com.greatwall.common.base.BaseEntity.Update;
import cn.com.greatwall.system.modules.system.domain.DictDetail;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * @Author herw
 * @Time 2020-10-24 16:15:03
 * @Version 1.0
 * @Description: TODO(用一句话描述该文件做什么)
 */
@Entity
@Getter
@Setter
@Table(name = "oauth_client_details")
public class OauthClientDetails implements Serializable {
    @Id
    @Column(name = "client_id")
    @NotNull(groups = Update.class)
//    @ApiModelProperty(value = "ID",hidden = true)
//    @GeneratedValue(strategy = GenerationType.AUTO)
    private String id;
    
    @ApiModelProperty(value = "资源ID")
    private String resourceIds;
    
    @ApiModelProperty(value = "密码")
    private String clientSecret;
    
    @ApiModelProperty(value = "权限")
    private String scope;
    
    @ApiModelProperty(value = "授权方式")
    private String authorizedGrantTypes;
    
    @ApiModelProperty(value = "回调URI")
    private String webServerRedirectUri;
    
    @ApiModelProperty(value = "角色")
    private String authorities;
    
    @ApiModelProperty(value = "Token有效期")
    private Integer accessTokenValidity;
    
    @ApiModelProperty(value = "Token刷新时间")
    private Integer refreshTokenValidity;
    
    @ApiModelProperty(value = "备注")
    private String additionalInformation;
    
    @ApiModelProperty(value = "授权")
    private String autoapprove;
}
